import base64
from zhipuais import ChatGLM4,ChatGLM4v


llm = ChatGLM4v()
img_path = "./img/297fa48288fad5ff54579139b162a84.png"
with open(img_path, 'rb') as img_file:
    img_base = base64.b64encode(img_file.read()).decode('utf-8')
chat = llm.stream("这个图片里面展示了什么？",img_base)
for i in chat:
    print(i,end="")













